package com.example.javaairportflightanalysis.service.impl;



import com.example.javaairportflightanalysis.dao.RoleMapper;
import com.example.javaairportflightanalysis.domin.userpojo.Role;
import com.example.javaairportflightanalysis.domin.userpojo.User;
import com.example.javaairportflightanalysis.service.RoleService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (Role)表服务实现类
 *
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Resource
    RoleMapper roleMapper;

    @Override
    public List<Role> selectById(Integer id) {
        return roleMapper.getAllRoles(id);
    }

    @Override
    public List<Role> findAllRole() {
        return roleMapper.findAllRole();
    }

    @Override
    public void addRole(Role role) {
        roleMapper.addRole(role);
    }

    @Override
    public void deleteRole(Integer id) {
        roleMapper.deleteRole(id);
    }

    @Override
    public void updateRole(Role role) {
        roleMapper.updateRole(role);
    }
}

